<?php
declare (strict_types = 1);

namespace app\common\validate;

use think\Validate;
class SchoolPettyCash extends Validate
{
    protected $rule = ['cash_info' => 'require','cash_price' => 'require|number','cash_note' => 'require',
    ];

    protected $message = ['cash_info.require' => '申请说明为必填项','cash_price.require' => '申请金额为必填项','cash_price.number' => '申请金额需为数字','cash_note.require' => '申请备注为必填项',
    ];

    /**
     * 添加
     */
    public function sceneAdd()
    {
        return $this->only(['cash_info','cash_price','cash_note',]);
    }

    /**
     * 编辑
     */
    public function sceneEdit()
    {
        return $this->only(['cash_info','cash_price','cash_note',]);
    }
}
